#include<iostream>
using namespace std;


void swap02(int * p1, int * p2)
{
    int temp = *p1;
    *p1 = *p2;
    *p2 = temp;

//    cout<<" a ="<<a<<endl;
//    cout<<" b ="<<b<<endl;
}

int main()
{
    //指针和函数
    //1，地址传递
    //如果是地址传递可以修改实参
    int a = 10;
    int b = 20;

    swap02(&a,&b);


    cout<<" a ="<<a<<endl;
    cout<<" b ="<<b<<endl;


    system("pause");
    return 0;

}